// router.js
var routes = require('../app/controller');
var user = require('../app/controller/user');
var movies = require('../app/controller/movies');
var superagent = require('../app/controller/superagent');
var file = require('../app/controller/file');

module.exports = function(app) {
	app.get('/', routes.index);
	//user
	app.get('/users', user.list);
	app.post('/users/reg', user.reg);//post用户注册
	app.get('/users/adduser', user.adduser);//添加用户
	// movies
	app.get('/movies',movies.index);//电影首页
	app.get('/movies/view',movies.view);//电影详情页
	// superagent || async
	app.get('/superagent', superagent.index);//superagent请求网页爬虫
	app.get('/superagent/eventurl', superagent.eventurl);//superagent请求网页爬虫之先获取列表的url地址。在获取文章内部的第一个评论内容
	app.get('/superagent/async', superagent.async);//可以控制并发数量的异步操作
	// app.get('/hello', routes.hello);//20140421添加
	// files操作
	app.get('/file', file.index);
} 